﻿using UnityEngine;
using UnityEngine.UI;

public class InputFieldToContent : MonoBehaviour
{
    InputField m_InputField;
    Text m_Text;
    void Start()
    {
        m_InputField = GetComponent<InputField>();
        m_Text = transform.parent.GetComponent<Text>();
        m_InputField.onValueChanged.AddListener((value) =>
        {
            m_Text.text = m_InputField.text;
        });
    }
}